package com.blb.community_admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community_admin.entity.ZyCommunity;
import com.blb.community_admin.entity.ZyRoom;
import com.blb.community_admin.mapper.ZyRoomMapper;
import com.blb.community_admin.service.IZyRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ZyRoomServiceImpl extends ServiceImpl<ZyRoomMapper, ZyRoom> implements IZyRoomService {
    @Resource
    private  ZyRoomMapper zyRoomMapper;
    @Override
    public List<ZyRoom> selectzyroom() {
        return zyRoomMapper.selectzyroom();
    }
    /**
     * 分页查询
     * @param current
     * @param size
     * @return
     */
    @Override
    public IPage<ZyRoom> selectRoomPage(Long current, Long size) {
        return zyRoomMapper.selectRoomPage(new Page<ZyRoom>(current,size));
    }

    @Override
    public IPage<ZyRoom> fuzzyPage(Long current, Long size, String roomStatus, String communityName, String unitName, String buildingName) {
        return zyRoomMapper.fuzzyPage(new Page<ZyRoom>(current,size),roomStatus,communityName,unitName,buildingName);
    }
}
